cmake_minimum_required(VERSION 3.10)

project(SEALDemo VERSION 1.0)

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

add_executable(1_bfv 1_bfv.cpp)
add_executable(2_encoders 2_encoders.cpp)
add_executable(3_levels 3_levels.cpp)
add_executable(4_ckks 4_ckks.cpp)
add_executable(5_rotation 5_rotation.cpp)
add_executable(vector_ops vector_ops.cpp)
add_executable(benchmark benchmark.cpp)
add_executable(benchmark2 benchmark2.cpp)
add_executable(matrix_ops matrix_ops.cpp)
add_executable(linear_transformation linear_transformation.cpp)
add_executable(linear_transformation2 linear_transformation2.cpp)
add_executable(matrix_multiplication matrix_multiplication.cpp)
add_executable(matrix_mult_benchmark matrix_mult_benchmark.cpp)
add_executable(polynomial polynomial.cpp)
add_executable(logistic_regression logistic_regression.cpp)
add_executable(logistic_regression_ckks logistic_regression_ckks.cpp)
add_executable(matrix_transpose matrix_transpose.cpp)

find_package(SEAL)
target_link_libraries(1_bfv SEAL::seal)
target_link_libraries(2_encoders SEAL::seal)
target_link_libraries(3_levels SEAL::seal)
target_link_libraries(4_ckks SEAL::seal)
target_link_libraries(5_rotation SEAL::seal)
target_link_libraries(vector_ops SEAL::seal)
target_link_libraries(benchmark SEAL::seal)
target_link_libraries(benchmark2 SEAL::seal)
target_link_libraries(matrix_ops SEAL::seal)
target_link_libraries(linear_transformation SEAL::seal)
target_link_libraries(linear_transformation2 SEAL::seal)
target_link_libraries(matrix_multiplication SEAL::seal)
target_link_libraries(matrix_mult_benchmark SEAL::seal)
target_link_libraries(polynomial SEAL::seal)
target_link_libraries(logistic_regression_ckks SEAL::seal)
target_link_libraries(matrix_transpose SEAL::seal)